
public class Field {
	
	private String fieldName;
	private String fieldType;
	private Object value;
	
	public Field(String fieldName, String fieldType, Object value) {
		this.fieldName = fieldName;
		this.fieldType = fieldType;
		this.value = value;
	}
	
	public String getFieldType() {
		return fieldType;
	}
	public void setFieldType(String fieldType) {
		this.fieldType = fieldType;
	}
	public Object getValue() {
		return value;
	}
	public void setValue(Object value) {
		this.value = value;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}
	
	public String toString()
	{
		String ret = "";
		switch (fieldType)
		{
		case "metadata":
			Metadata[] data = (Metadata[]) value;
			ret = "metadata=";
			for (int i = 0;i < 127; i++)
				if (data[i] != null)
						ret = ret + "[" + i + "]" + data[i].toString() + ";";
			return ret;
		default:
			return "<" + getFieldName() + "|" + getFieldType() + "|" + getValue() + ">";
		}
			
	}
	
	
}
